<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:define name="sidebar">
	<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
		<h:outputText value="Raise Complaint/Suggestions" styleClass="outputTextTitle" />		
		<h:form>		 
			<p:growl />
		 
		 <p:panel header="#{msg['complaints.lable.heading']}">       
         <h:panelGrid columns="3">        
         	
		          <h:outputText value="Complaint/Suggestion Code "  />
		          <h:outputLabel value=" : " />
		          <h:outputText value="#{raiseComplaintBean.complaintCode}" style="font-weight:bold;" /> 
	      
		          <h:outputText value="Enter Your Name(Optional) " /> 
		          <h:outputLabel value=" : " />
		          <p:inputText value="#{raiseComplaintBean.complaintsAndSuggestion.raiser}" width="600" size="30" />
	      
		          <h:outputText value="Enter Complaint/Suggestion" style="font-weight:bold;" />		          
		          <!-- <p:editor id="editor"  width="600"/> -->          
         </h:panelGrid>	
                  <p:inputTextarea value="#{raiseComplaintBean.complaintsAndSuggestion.complaint}" style="width:360px;" rows="15" /><br />
         
         
         <h:panelGrid style="padding-top: 5px; width: 100%; border-top: 1px solid #d9d9d9"
						columnClasses="gridCellMiddleRightAligned">
				<h:panelGroup>
		           <p:commandButton value="Submit"  actionListener="#{raiseComplaintBean.confirmationAction}" update="@form" />
		           <p:commandButton value="Reset" action="raisecomplaint" /> 
		           <p:commandButton value="Home" action="wudashboard" /> 		           
   				</h:panelGroup>
		</h:panelGrid>
          
	     </p:panel>
	     <p:confirmDialog widgetVar="confirmation" id="confirmation" severity="alert" message="This will submit your complaint. Proceed?">
				<h:panelGroup style="text-align: right; float: right;">
					<p:commandButton value="Yes, Submit Now" action="#{raiseComplaintBean.saveComplaint}" update="@form" oncomplete="confirmation.hide()"/>
					<p:commandButton id="decline" value="Not Yet" onclick="confirmation.hide()" type="button" />
				</h:panelGroup>
		</p:confirmDialog>
		
          	
		</h:form>
	</ui:define>
</ui:composition>

